{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import torch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'dampening': 0,\n",
       " 'initial_lr': 0.005,\n",
       " 'lr': 0.0029003234654004072,\n",
       " 'momentum': 0.9,\n",
       " 'nesterov': False,\n",
       " 'params': [140508707131896,\n",
       "  140508707135136,\n",
       "  140508707133768,\n",
       "  140508707021808,\n",
       "  140508707023608,\n",
       "  140508707023176,\n",
       "  140508707023968,\n",
       "  140508707024112,\n",
       "  140508707023392,\n",
       "  140508707022816,\n",
       "  140508707023896],\n",
       " 'weight_decay': 0.0001}"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wt = torch.load('../experiments/siampose_base/checkpoint_e17.pth', map_location='cpu')\n",
    "print(len(wt['optimizer']['param_groups']))\n",
    "wt['optimizer']['param_groups'][3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "a = wt['optimizer']['param_groups'][0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[{'dampening': 0,\n",
       "  'initial_lr': 0.005,\n",
       "  'lr': 0.005,\n",
       "  'momentum': 0.9,\n",
       "  'nesterov': False,\n",
       "  'params': [139922612654368, 139922612654872, 139922612657176],\n",
       "  'weight_decay': 0.0001},\n",
       " {'dampening': 0,\n",
       "  'initial_lr': 0.005,\n",
       "  'lr': 0.005,\n",
       "  'momentum': 0.9,\n",
       "  'nesterov': False,\n",
       "  'params': [139922612557072,\n",
       "   139922612556136,\n",
       "   139922612559232,\n",
       "   139922612559736,\n",
       "   139922612557504,\n",
       "   139922612559592,\n",
       "   139922612558512,\n",
       "   139922612558728,\n",
       "   139922612558224,\n",
       "   139922612557144,\n",
       "   139922612556064,\n",
       "   139922612556568,\n",
       "   139922612557792,\n",
       "   139922612556280,\n",
       "   139922612509504,\n",
       "   139922612509648,\n",
       "   139922612509216,\n",
       "   139922612510368,\n",
       "   139922612506840,\n",
       "   139922612509936,\n",
       "   139922612654656,\n",
       "   139922612654296],\n",
       "  'weight_decay': 0.0001},\n",
       " {'dampening': 0,\n",
       "  'initial_lr': 0.005,\n",
       "  'lr': 0.005,\n",
       "  'momentum': 0.9,\n",
       "  'nesterov': False,\n",
       "  'params': [139922612656024,\n",
       "   139922612655088,\n",
       "   139922612655016,\n",
       "   139922612655880,\n",
       "   139922612655232,\n",
       "   139922612656384,\n",
       "   139922612657680,\n",
       "   139922612657752,\n",
       "   139922612658040,\n",
       "   139922612191592,\n",
       "   139922612194760],\n",
       "  'weight_decay': 0.0001}]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wt = torch.load('../experiments/siampose_base/checkpoint_e6.pth', map_location='cpu')\n",
    "\n",
    "print(len(wt['optimizer']['param_groups']))\n",
    "wt['optimizer']['param_groups']"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
